	.file	1 "image_writer.c"
	.section .mdebug.abi32
	.previous
	.abicalls
	.rdata
	.align	2
$LC0:
	.ascii	"Board size: %ldx%ld.\n\000"
	.align	2
$LC1:
	.ascii	"P2\n"
	.ascii	"%ld\n"
	.ascii	"%ld\n"
	.ascii	"%ld\n\000"
	.text
	.align	2
	.globl	generate_pgm_board_image
	.ent	generate_pgm_board_image
generate_pgm_board_image:
	.frame	$fp,88,$ra		# vars= 40, regs= 3/0, args= 24, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,88
	.cprestore 24
	sw	$ra,80($sp)
	sw	$fp,76($sp)
	sw	$gp,72($sp)
	move	$fp,$sp
	sw	$a0,88($fp)
	sw	$a1,92($fp)
	lw	$v0,88($fp)
	lw	$v0,0($v0)
	sw	$v0,52($fp)
	lw	$v0,52($fp)
	bgez	$v0,$L18
	lw	$v1,52($fp)
	addu	$v1,$v1,7
	sw	$v1,52($fp)
$L18:
	lw	$a0,52($fp)
	sra	$v0,$a0,3
	sw	$v0,40($fp)
	lw	$v0,88($fp)
	lw	$v0,4($v0)
	sw	$v0,56($fp)
	lw	$v0,56($fp)
	bgez	$v0,$L19
	lw	$v1,56($fp)
	addu	$v1,$v1,7
	sw	$v1,56($fp)
$L19:
	lw	$a0,56($fp)
	sra	$v0,$a0,3
	sw	$v0,44($fp)
	lw	$v0,88($fp)
	lw	$v1,88($fp)
	la	$a0,$LC0
	lw	$a1,0($v0)
	lw	$a2,4($v1)
	la	$t9,messageinfo
	jal	$ra,$t9
	lw	$v1,88($fp)
	lw	$a3,88($fp)
	li	$v0,1			# 0x1
	sw	$v0,16($sp)
	lw	$a0,92($fp)
	la	$a1,$LC1
	lw	$a2,0($v1)
	lw	$a3,4($a3)
	la	$t9,fprintf
	jal	$ra,$t9
	bgez	$v0,$L20
	li	$v0,11			# 0xb
	sw	$v0,48($fp)
	b	$L17
$L20:
	sw	$zero,32($fp)
$L21:
	lw	$v0,88($fp)
	lw	$v1,32($fp)
	lw	$v0,4($v0)
	slt	$v0,$v1,$v0
	bne	$v0,$zero,$L24
	b	$L22
$L24:
	sw	$zero,36($fp)
$L25:
	lw	$v0,88($fp)
	lw	$v1,36($fp)
	lw	$v0,0($v0)
	slt	$v0,$v1,$v0
	bne	$v0,$zero,$L28
	b	$L26
$L28:
	li	$a0,32			# 0x20
	lw	$a1,92($fp)
	la	$t9,fputc
	jal	$ra,$t9
	move	$v1,$v0
	li	$v0,-1			# 0xffffffffffffffff
	bne	$v1,$v0,$L29
	li	$v1,11			# 0xb
	sw	$v1,48($fp)
	b	$L17
$L29:
	lw	$v0,40($fp)
	.set	noreorder
	bne	$v0,$0,1f
	nop
	break	7
1:
	.set	reorder
	lw	$v1,32($fp)
	lw	$v0,44($fp)
	div	$0,$v1,$v0
	mflo	$v1
	.set	noreorder
	bne	$v0,$0,1f
	nop
	break	7
1:
	.set	reorder
	andi	$v0,$v1,0x1
	bne	$v0,$zero,$L33
	lw	$v1,36($fp)
	lw	$v0,40($fp)
	div	$0,$v1,$v0
	mflo	$a0
	sw	$a0,64($fp)
	.set	noreorder
	bne	$v0,$0,1f
	nop
	break	7
1:
	.set	reorder
	lw	$v1,64($fp)
	andi	$v0,$v1,0x1
	sltu	$v0,$zero,$v0
	sw	$v0,64($fp)
	lw	$a0,64($fp)
	bne	$a0,$zero,$L34
	b	$L31
$L33:
	lw	$v1,36($fp)
	lw	$v0,40($fp)
	div	$0,$v1,$v0
	mflo	$a0
	sw	$a0,68($fp)
	.set	noreorder
	bne	$v0,$0,1f
	nop
	break	7
1:
	.set	reorder
	lw	$v1,68($fp)
	andi	$v0,$v1,0x1
	xori	$v0,$v0,0x0
	sltu	$v0,$v0,1
	sw	$v0,68($fp)
	lw	$a0,68($fp)
	bne	$a0,$zero,$L34
	b	$L31
$L34:
	li	$v0,48			# 0x30
	sw	$v0,60($fp)
	b	$L32
$L31:
	li	$v1,49			# 0x31
	sw	$v1,60($fp)
$L32:
	lw	$a0,60($fp)
	lw	$a1,92($fp)
	la	$t9,fputc
	jal	$ra,$t9
	move	$v1,$v0
	li	$v0,-1			# 0xffffffffffffffff
	bne	$v1,$v0,$L27
	li	$a0,11			# 0xb
	sw	$a0,48($fp)
	b	$L17
$L27:
	lw	$v0,36($fp)
	addu	$v0,$v0,1
	sw	$v0,36($fp)
	b	$L25
$L26:
	li	$a0,10			# 0xa
	lw	$a1,92($fp)
	la	$t9,fputc
	jal	$ra,$t9
	move	$v1,$v0
	li	$v0,-1			# 0xffffffffffffffff
	bne	$v1,$v0,$L23
	li	$v0,11			# 0xb
	sw	$v0,48($fp)
	b	$L17
$L23:
	lw	$v0,32($fp)
	addu	$v0,$v0,1
	sw	$v0,32($fp)
	b	$L21
$L22:
	sw	$zero,48($fp)
$L17:
	lw	$v0,48($fp)
	move	$sp,$fp
	lw	$ra,80($sp)
	lw	$fp,76($sp)
	addu	$sp,$sp,88
	j	$ra
	.end	generate_pgm_board_image
	.size	generate_pgm_board_image, .-generate_pgm_board_image

	.comm	pprocfilename,4
	.ident	"GCC: (GNU) 3.3.3 (NetBSD nb3 20040520)"
